<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>null,undefined,NaN这三个值有什么区别</title>
</head>
<body>
<script type="text/javascript">
    alert(typeof null);         //object
    alert(typeof undefined);    //undefined
    alert(typeof NaN);           //number

    alert(null==undefined);      //true
    alert(null==NaN);            //false
    alert(undefined==NaN);       //false
    //在JS中“==”：等同运算符，只判断值是否相等
    //“===”：全等运算符既判断值是否相等，也判断数据类型是否相等
    alert(null===undefined);     //false
    alert(null===NaN);           //false
    alert(undefined===NaN);      //false
</script>
</body>
</html>